#pragma once

#include "Common/Stream.h"
#include "Common/BinaryReader.h"

struct PlayerData
{
	UInt64		_id;
	std::string	_nick;
	UInt8		_sex;
	std::string	_headIcon;
	UInt64		_promoter;
	UInt32		_rid;
	std::string	_reports;
	UInt32		_loginTime;
	UInt32		_createdTime;

	PlayerData( UInt64 id_ = 0 )
		: _id( id_ ), _sex( 0 ), _promoter( 0 ), _rid( 0 ), _loginTime( 0 ), _createdTime( 0 )
	{
	}
	void appendData( Stream& st )
	{
		st << _id << _nick << _sex << _headIcon << _promoter << _rid;
	}
	void appendSimpleData( Stream& st )
	{
		st << _id << _nick << _sex << _headIcon << _promoter << _rid;
	}
	void buildData( BinaryReader& br )
	{
		br >> _id >> _nick >> _sex >> _headIcon >> _promoter >> _rid;
	}
};
